import Https from '@/utils/https'

// 获取离线同步任务统计信息
const getDatabasesByDsType = (params) => Https.get('/api/v1/integration/online/getDatabasesByDsType', params)
const onlinePreviewData = (params) => Https.get('/api/v1/integration/online/previewData', params, { needCode: true })
const getCreateTableSql = (params) => Https.get('/api/v1/integration/online/getCreateTableSql', params, { needCode: true })
const executeCreateTableSql = (params) => Https.post('/api/v1/integration/online/executeCreateTableSql', params, { needCode: true, json: false })
const getTopic = (params) => Https.get('/api/v1/integration/online/getTopic', params, { needCode: true })
const getDirList = (params) => Https.get('/api/v1/integration/online/getDirList', params, { needCode: true })
const getTables = (params) => Https.get('/api/v1/integration/online/getTables', params, { needCode: true })
const previewDataForMq = (params) => Https.post('/api/v1/integration/online/previewDataForMq', params, { needCode: true })
const onlineInsert = (params) => Https.post('/api/v1/integration/online/insert', params, { needCode: true })
const onlineSchema = (params) => Https.get('/api/v1/integration/online/schema', params, { needCode: true })

export {
  getDatabasesByDsType, onlinePreviewData, getCreateTableSql, executeCreateTableSql,
  getTables, getTopic, getDirList, previewDataForMq, onlineInsert, onlineSchema,
}
